#pragma once
#include <string>

struct Config {
	float fx = 0.f, fy = 0.f;
	float cx = 0.f, cy = 0.f;
	int image_width = 0, image_height = 0;
	std::string data_path = "";
};

class ConfigBuilder {
public:
	virtual Config Build() = 0;
	Config config_;
};

class YamlConfigBuilder: public ConfigBuilder {
public:
	YamlConfigBuilder(const std::string& yaml_path) 
		: yaml_path_(yaml_path) {}

	Config Build() override { return config_; }

	std::string yaml_path_;
};

class ManualConfigBuilder : public ConfigBuilder {
public:
	ManualConfigBuilder() {}

	ManualConfigBuilder& fx(float value);
	ManualConfigBuilder& fy(float value);
	ManualConfigBuilder& cx(float value);
	ManualConfigBuilder& cy(float value);
	ManualConfigBuilder& image_width(int value);
	ManualConfigBuilder& image_height(int value);
	ManualConfigBuilder& data_path(const std::string& value);

	Config Build() override { return config_; }
};